<template>
  <div class="tab">
    <div>Posts component</div>
    post nums : {{ postNum }} <button @click="postNum++">
      增加 num
      </button>
  </div>
</template>
<script lang="ts" setup>
import { onMounted, onUnmounted, ref } from 'vue';

const postNum = ref(0)

onMounted(() => {
  console.log("Posts组件被加载了")
})

onUnmounted(() => {
  console.log("Posts组件被卸载了")
})
</script>